﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using Component;

public partial class BackEnd_Color_ColorM : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void cmdLuu_Click(object sender, EventArgs e)
    {
        Colors color = new Colors(KetNoiCSDL.session);
        if (cbActive.Checked == true)
            color.Active = true;
        color.Name = txtName.Text;
        color.Value = txtValue.Text;
        if (ColorDB.Save(color)==1)
        {
            lbMessage.Text = ConstString._ThucHienTC;
            Response.Redirect(Request.Url.ToString());
        }
        else
            lbMessage.Text = ConstString._ThucHienTB;
    }
}
